<?php session_start();$_SESSION['task_id']=1; ?>
<!DOCTYPE html>
<html >
<head>
    <title>Create Experiment</title>
    <?php $_SESSION['page_name']='new Exp';include('Menu.php');?>
    <script  type="text/javascript" src="calender.js">DateInput('orderdate', true, 'DD-MON-YYYY')</script>
    <script  type="text/javascript" language="javascript">
    function passVar(){
        if(document.form1.R1.checked ){location.replace('newExpe.php');}
        else  if ( document.form1.R2.checked){}
    }
function radiobtn(){alert ("ssss");}  
function textEn() {
//if(document.form1.R1.checked || document.form1.R2.checked )
if(document.getElementById('Radio1').checked || document.getElementById('Radio2').checked )
{document.form1.time.disabled=false;
document.form1.title.disabled=false;
    if(document.getElementById('Radio1').checked){
           var continu = document.getElementById('btnSb');
          continu.style.visibility = 'visible';
         var continuu = document.getElementById('btnEx');
          continuu.style.visibility = 'hidden';
        document.form1.exper.disabled=true;
        }
    else if(document.getElementById('Radio2').checked) {
    var continuu = document.getElementById('btnEx');
          continuu.style.visibility = 'visible';
         var continu = document.getElementById('btnSb');
          continu.style.visibility = 'hidden';
       document.form1.exper.disabled=false;
        }
   }
else
{
document.form1.title.disabled=true;
document.form1.time.disabled=true;
 
}
}
    </script>
</head>
<body text="#70B8FF">
  <form action='newExpe.php' method='post' name="form1">
       <p>
    <table><tr><td>
        <input id="Radio1" name="R1" type="radio" onclick="textEn()" value="V1" />Create New Experiment </td></tr><tr><td>
            <input id="Radio2" name="R1" type="radio" value="V2" onclick="textEn()" />Choose an Existing Experiment</td></tr>
        <tr><td><select name="exper" value="none" disabled="false"><option>PLZ CHOOSE AN EXSISTANT Experiment</option>
            <?php 
            $con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("usabilityevaluation", $con);

$result = mysql_query("SELECT * FROM experimentation") ;
while($row = mysql_fetch_array($result)){
echo "<option value='".$row['Title']."'>".$row['Title']."</option>";
}
mysql_close($con);
      
            ?>
            
        </select></td></tr>
</table> 
</p>
 <div id="divId">
<!--  <  -->
    <table><tr><td>
    <p>Experiment Name&nbsp;&nbsp; :   </td><td>  
        <input  type="text" name="title" disabled="false" /></p></td></tr>
    <tr><td><p id="123">Please select a date: </td>  <td>
        <input type="text" value="Click me!" name="time" id="SelectedDate" disabled="false" readonly onClick="GetDate(this);"/></p></td></tr>
    <p>
       <tr><td></td><td></td><td> <input value="submit" name="newExp" type="submit" id="btnSb" align="right" style="visibility: hidden; right;" />
        <input id="btnEx" value="submit_Exist_Exp" type="submit" align="right" style="visibility:hidden;" /> </p></td>
 
 </table>
    </div>

</form>
</body>
</html>